//A类默认继承了Object类
class A{
    public int a = 10;
}
//B类继承A类，所以B类也继承了Object类
class B extends A{
    public String B;
}
public class Test {
    public static void main(String[] args) {
        Object o1 = new A();//向上转型
        Object o2 = new B();//向上转型
    }
}
